package com.yutianran.springBoot.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @RequestMapping("/hello")
    @ResponseBody
    public String test() {
        return "hello,SpringBoot";
    }

    public void switchDefault() {
        int code = 404;
        switch (code) {
            case 200:
                System.out.println("200");
                break;
            case 300:
                System.out.println("300");
                break;
            case 400:
                System.out.println("2400");
                break;
            case 500:
                System.out.println("500");
                break;
        }
    }
}
